﻿Class MainWindow 

    Private Sub TextBox_TextChanged_1(sender As Object, e As TextChangedEventArgs)
        Try
            Dim xml As New XElement("entry")
            xml.SetAttributeValue("startdate", New Date(tb_startdate.Text.Split(".")(2), tb_startdate.Text.Split(".")(1), tb_startdate.Text.Split(".")(0), 0, 0, 0).Ticks)
            xml.SetAttributeValue("enddate", New Date(tb_enddate.Text.Split(".")(2), tb_enddate.Text.Split(".")(1), tb_enddate.Text.Split(".")(0), 0, 0, 0).Ticks)
            xml.SetAttributeValue("text", tb_text.Text)
            Dim root As New XElement("items")
            root.Add(xml)
            xmlresult.Text = root.ToString
        Catch ex As Exception

        End Try
        
    End Sub
End Class
